package org.example.context;

import java.math.BigInteger;

public class UserContext {
    private static final ThreadLocal<BigInteger> currentUserId = new ThreadLocal<>();

    public static BigInteger getCurrentUserId() {
        return currentUserId.get();
    }

    public static void setCurrentUserId(BigInteger userId) {
        currentUserId.set(userId);
    }

    public static void clear() {
        currentUserId.remove();
    }
}
